home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_whipcam.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  94 lines

  1. # Jones 3D Cog Script
  2. #
  3. # Shs_WhipCam.cog
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.     
  12.     message     damaged
  13.     message     entered
  14.         
  15.     thing       player      local
  16.     thing       strut       #mask=0x8
  17.     thing       whipCam1
  18.     
  19.     thing         thisSide
  20.     thing         thatSide
  21.     
  22.     sound       mus_Cue=mus_gen_indywhip1.wav       local
  23.     
  24.     int         side2=0         local
  25.     int         firstTime=1     local
  26.     
  27.     flex        returncontrol    local
  28.  
  29. end
  30.  
  31.  
  32. # ========================================================================================
  33.  
  34. code
  35.  
  36. damaged:
  37.  
  38.     player = GetLocalPlayerThing();
  39.     
  40.     if(GetParam(1) == 0x10)
  41.     {
  42.         if(firstTime == 1)
  43.         {
  44.             firstTime = 0;
  45.             sleep(1.5);
  46.             PlaySoundLocal(mus_Cue, 1.0, 0.0, 0x0, 0);
  47.         }
  48.         
  49.         # disable controls, switch camera
  50.         StartCutscene(0);
  51.         SetActorFlags(player, 0x200000);
  52.         SetCameraFocus(2, whipCam1);
  53.         SetCameraSecondaryFocus(2, player);
  54.         SetCurrentCamera(2);
  55.         SetCameraFOV(70, 0, 0.0);
  56.     }
  57.                 
  58.     return;
  59.  
  60. # ========================================================================================
  61.  
  62. entered:
  63.     
  64.     # land on other side
  65.     if((GetSenderRef() == thatSide) && (side2 == 0))
  66.     {
  67.         side2 = 1;
  68.         call returncontrol;
  69.     }
  70.     
  71.     # land on initial side
  72.     if((GetSenderRef() == thisSide) && (side2 == 1))
  73.     {
  74.         side2 = 0;
  75.         call returncontrol;
  76.     }
  77.     return;
  78.                
  79. # ========================================================================================
  80.  
  81. returncontrol:
  82.  
  83.     ClearActorFlags(player, 0x200000);
  84.     EndCutscene();
  85.     SetCameraFOV(90, 0, 0.0);
  86.     SetCurrentCamera(1);
  87.     return;
  88.  
  89. # ========================================================================================
  90.  
  91. end
  92.  
  93.  
  94.